import { Controller, Get, Query } from '@nestjs/common';

@Controller('rang')
export class RangController {
  @Get()
  getParams(@Query('num') num: string) {
    if (!!Number(num) && typeof Number(num) === 'number') {
      return new Array(Number(num)).fill('true').map((v, i) => i + 1);
    } else {
      return { code: 500, msg: '格式错误' };
    }
  }
}
